﻿using System.Collections.Generic;

namespace User.Api.Dto.Paper
{
    public class GetAllResponse : BaseResponse
    {
        /// <summary>
        /// 待评价满意度调查
        /// </summary>
        public List<TreatInfo> WaitingPapers { get; set; }

        /// <summary>
        /// 已提交满意度调查
        /// </summary>
        public List<TreatInfo> CompletePapers { get; set; }
    }

    public class TreatInfo
    {
        public string DeptId { get; set; }

        public string DeptName { get; set; }

        public string TreatDate { get; set; }

        public string OrderType { get; set; }

        public string OrderId { get; set; }

        /// <summary>
        /// 是否已经评价过 0：未评价 1 已评价
        /// </summary>
        public bool IsAnswered { get; set; }

        /// <summary>
        /// 重写equals 
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            var objTreat = (TreatInfo)obj;
            //if (this.DeptId != objTreat.DeptId)
            //    return false;
            //if (this.DeptName != objTreat.DeptName)
            //    return false;
            if (this.TreatDate != objTreat.TreatDate)
                return false;
            return true;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}